package com.eunion.web.cms.entity;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;

@Entity
@Table(name = "t_question")
@NamedQuery(name = "TQuestion.findAll", query = "SELECT t FROM TQuestion t")
public class TQuestion {

	@Id
	private int id;

	private int userid;

	private String usercode;

	private int questiontype;

	private String describes;

	private Integer answerid;

	private String reply;

	@Transient
	private String username;

	private String answername;

	@Transient
	private Integer userlevel;

	private int status;

	private Date createtime;

	private Date updatetime;

	@Transient
	private String imgurl;

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getUserid() {
		return userid;
	}

	public void setUserid(int userid) {
		this.userid = userid;
	}

	public String getUsercode() {
		return usercode;
	}

	public void setUsercode(String usercode) {
		this.usercode = usercode;
	}

	public int getQuestiontype() {
		return questiontype;
	}

	public void setQuestiontype(int questiontype) {
		this.questiontype = questiontype;
	}

	public String getReply() {
		return reply;
	}

	public void setReply(String reply) {
		this.reply = reply;
	}

	public String getAnswername() {
		return answername;
	}

	public void setAnswername(String answername) {
		this.answername = answername;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Date getCreatetime() {
		return createtime;
	}

	public void setCreatetime(Date createtime) {
		this.createtime = createtime;
	}

	public Date getUpdatetime() {
		return updatetime;
	}

	public void setUpdatetime(Date updatetime) {
		this.updatetime = updatetime;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getDescribes() {
		return describes;
	}

	public void setDescribes(String describes) {
		this.describes = describes;
	}

	public Integer getAnswerid() {
		return answerid;
	}

	public void setAnswerid(Integer answerid) {
		this.answerid = answerid;
	}

	public Integer getUserlevel() {
		return userlevel;
	}

	public void setUserlevel(Integer userlevel) {
		this.userlevel = userlevel;
	}

	public String getImgurl() {
		return imgurl;
	}

	public void setImgurl(String imgurl) {
		this.imgurl = imgurl;
	}

	public TQuestion() {
		super();
	}

	public TQuestion(int id, int userid, String usercode, int questiontype, String describes, Integer answerid, String reply, String username, String answername, Integer userlevel, int status,
	                 Date createtime, Date updatetime, String imgurl) {
		super();
		this.id = id;
		this.userid = userid;
		this.usercode = usercode;
		this.questiontype = questiontype;
		this.describes = describes;
		this.answerid = answerid;
		this.reply = reply;
		this.username = username;
		this.answername = answername;
		this.userlevel = userlevel;
		this.status = status;
		this.createtime = createtime;
		this.updatetime = updatetime;
		this.imgurl = imgurl;
	}

	@Override
	public String toString() {
		return "TQuestion [id=" + id + ", userid=" + userid + ", usercode=" + usercode + ", questiontype=" + questiontype + ", describes=" + describes + ", answerid=" + answerid + ", reply=" + reply
		       + ", username=" + username + ", answername=" + answername + ", userlevel=" + userlevel + ", status=" + status + ", createtime=" + createtime + ", updatetime=" + updatetime
		       + ", imgurl=" + imgurl + "]";
	}

}
